﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace UI.Forms
{
    /// <summary>
    /// 及时库存查询
    /// </summary>
    public partial class ViewOnhand : FormBase1
    {
        public ViewOnhand()
        {
            InitializeComponent();
        }

        private void opencardList_Load(object sender, EventArgs e)
        {
            //BindingList<SVC.client.View_Emp_lite> emps=my.bw.View_Emp_lite_List("",my.ACID);
            //dateselect1.lue_date.Properties.DataSource = my.dts;
            //lue_client.Properties.DataSource = my.bw.View_Client_lite_List(false, my.ACID);
            //lue_client.Properties.DisplayMember = "ClientName";
            //lue_client.Properties.ValueMember = "ClientID";
            //lue_js.Properties.DataSource = emps;
            //lue_js.Properties.DisplayMember = "EmpName";
            //lue_js.Properties.ValueMember = "EmplID";
            //lue_op.Properties.DataSource = emps;
            //lue_op.Properties.DisplayMember = "EmpName";
            //lue_op.Properties.ValueMember = "EmplID";
            //dateselect1.lue_date.EditValue = 1;
            BindData();
        }


        private void BindData()
        {
            //DateTime? sd = null;
            //DateTime? ed = null;
            //if (dateselect1.de_sd.EditValue != null)
            //{ sd = dateselect1.de_sd.DateTime; }
            //if (dateselect1.de_ed.EditValue != null)
            //{ ed = dateselect1.de_ed.DateTime; }

            //Guid? clientid = null;
            //Guid? opid = null;
            //Guid? jsid = null;
            //if (lue_client.EditValue != null) clientid = new Guid(lue_client.EditValue.ToString());
            //if (lue_op.EditValue != null) opid = new Guid(lue_op.EditValue.ToString());
            //if (lue_js.EditValue != null) jsid = new Guid(lue_js.EditValue.ToString());

            gridControl1.DataSource = my.bw.Get_Onhand(my.ACID);
        }
    }
}